package com.lanzhou.yuanfen.diary.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lanzhou.yuanfen.diary.entity.Archive;
import com.lanzhou.yuanfen.diary.mapper.ArchiveMapper;
import com.lanzhou.yuanfen.diary.service.IArchiveService;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author lcllge
 * @since 2020-07-28
 */
@Service
@CacheConfig(cacheNames = "archive", keyGenerator = "myKeyGenerator")
public class ArchiveServiceImpl extends ServiceImpl<ArchiveMapper, Archive> implements IArchiveService {

    @Override
    @Cacheable(value = "archive", keyGenerator = "myKeyGenerator")
    public List<Archive> redisCache() {
        return list();
    }

}
